var config = require('../config');
var ds = config.dataSource;
var dbType = config.dbType;
var mongoose = require('mongoose');
//var db = mongoose.connect('mongodb://'+ds.host+'/'+ds.database);

function mongoDB() {
	var conn = mongoose.connect('mongodb://'+ds.host+'/'+ds.database);
	return conn;
}

exports.getDBConn = function(){
	var conn;
	if(dbType=='mongodb'){
		conn = new mongoDB();
	}
	return conn;
}